﻿<%@ Page Title="" Language="C#" MasterPageFile="~/HomePage.master" AutoEventWireup="true"
    CodeFile="Listtour.aspx.cs" Inherits="Listtour" %>

<%@ Import Namespace="AppCommon" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Danh sách tour đang mở |
        <%= Constants.TITLE_MAIN_PAGE %></title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" RenderMode="Block">
        <ContentTemplate>
            <div class="row">
                <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
                    <h3>Danh sách tour</h3>
                    <asp:GridView CssClass="table table-bordered" ID="gvListtour" DataKeyNames="Id"
                        runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" PageSize="10"
                        AllowPaging="true" PagerSettings-Position="TopAndBottom" OnPageIndexChanging="gv_PageIndexChanging"
                        PagerSettings-PageButtonCount="5" AllowSorting="true" OnSorting="gv_Sorting"
                        EmptyDataText="Chưa cập nhật dữ liệu" AutoGenerateEditButton="False" AutoGenerateColumns="False">
                        <Columns>
                            <asp:TemplateField HeaderText="Tiêu đề">
                                <ItemTemplate>
                                    <h4>
                                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/tour/" + Eval("UniqueId") %>'>
                                <%# Eval("TieuDe") %>
                                        </asp:HyperLink></h4>
                                    <p>
                                        <%# Eval("TomTat") %>
                                    </p>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <Columns>
                            <asp:TemplateField HeaderText="Ngày đi">
                                <ItemTemplate>
                                    <%# DateTime.Parse(Eval("NgayDi").ToString()).ToString("dd/MM/yyyy") %>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <Columns>
                            <asp:BoundField DataField="SoCho" HeaderText="Số chỗ" />                            
                        </Columns>
                        <Columns>
                            <asp:TemplateField HeaderText="Giá tour">
                                <ItemTemplate>
                                    <i class="label label-danger"><%# String.Format("{0:###,###,##0}", Convert.ToDecimal(Eval("Gia"))).ToString()%> VNĐ</i>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <Columns>
                            <asp:TemplateField HeaderText="Đặt tour">
                                <ItemTemplate>
                                    <asp:HyperLink runat="server" NavigateUrl='<%# "~/dattour/" + Eval("Id") + "/dangky" %>'><i>Đặt tour</i></asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <AlternatingRowStyle BackColor="White" />
                        <HeaderStyle Height="0"></HeaderStyle>
                        <PagerSettings Mode="Numeric"></PagerSettings>
                    </asp:GridView>
                </div>
                <!--/ end content -->
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
